<div ng-include src="'tpl/public/header.html'"></div>
<div class="contents">
    <ol class="breadcrumb">
        <li><a href="#/index/panel">首页</a></li>
        <li class="active">未添加产品关键词</li>
    </ol>
</div>

<div class="row">
    <div class="col-xs-12">
        <div class="panel panel-primary" has-auth where="btn" who="STATISTICS_PRODUCT_KEYWORD">
            <div class="panel-heading">用户搜索产品关键词</div>
            <table class="table table-striped text-center table-bordered">
                <thead>
                <tr>
                    <!--<th class="text-center">id</th>-->
                    <!--<th class="text-center">openId</th>-->
                    <!--<th class="text-center">微信用户名</th>-->
                    <!--<th class="text-center">微信用户头像</th>-->
                    <th class="text-center" width="10%">序号</th>
                    <th class="text-center" width="20%">搜索类型</th>
                    <th class="text-center" width="20%">反馈状态
                        <select ng-model="feedbackStatus" ng-change="query(feedbackStatus);">
                        <option value="">All</option>
                        <option value="0">未反馈</option>
                        <option value="2">已反馈</option>
                        </select>
                    </th>
                    <th class="text-center" width="30%">产品关键字</th>
                    <th class="text-center" width="15%">操作</th>
                </tr>
                </thead>
                <tbody ng-repeat="item in searchKeyWord.data">
                <tr>
                    <!--<td>{{item.id}}</td>-->
                    <!--<td>{{item.openid}}</td>-->
                    <!--<td>{{item.wxUsername}}</td>-->
                    <!--<td><img style="width: 40px;height: 40px;" ng-src="{{item.wxUserhearimg}}"/></td>-->
                    <td>{{$index+1}}</td>
                    <td>{{item.searchType=='0'&&'标签查询' || item.searchType=='1'&&'关键字查询'}}{{item.id}}</td>
                    <td>
                        <div ng-show="item.feedbackStatus == '0'||item.feedbackStatus == '1'">未反馈</div>
                        <div ng-show="item.feedbackStatus == '2'">已反馈</div>
                    </td>
                    <td>{{item.keyword}}</td>
                    <td>
                        <a class="text-center" has-auth where="btn" who="STATISTICS_PRODUCT_KEYWORD_USER" style="color: #00b7ee;" href="javascript:" ng-click="showXcxUser(item, searchKeyWord.data)">查看搜索用户</a>
                        <a class="text-center" has-auth where="btn" who="STATISTICS_SEND_MSG" style="color: #FF0000;" ng-if="item.feedbackStatus == 0" href="javascript:" ng-click="sendMsg(item)">回复</a>
                    </td>
                </tr>
                <tr ng-if="item.checked">
                    <td colspan="4">
                        <table class="table text-left" style="background-color: #dddddd">
                            <thead>
                            <tr>
                                <th class="text-left" width="10%">openid</th>
                                <th class="text-left" width="20%">头像</th>
                                <th class="text-left" width="10%">昵称</th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr ng-repeat="d in searchUserList">
                                <td>{{d.openid}}</td>
                                <td><img style="width: 40px;height: 40px;" ng-src="{{d.wxUserhearimg}}"/></td>
                                <td>{{d.wxUsername}}</td>
                            </tr>
                            </tbody>
                        </table>
                    </td>
                </tr>
                </tbody>
            </table>

        </div>
        <div pagination  max-size="5" items-per-page="searchKeyWord.pager.pageSize"
             boundary-links="true" total-items="searchKeyWord.pager.totalCount" ng-model="searchKeyWord.pager.pageNo" class="pagination-sm"
             previous-text="上一页" next-text="下一页" ng-change="pageChanged()"></div>

    </div>
</div>